package com.mobilesalon.model;

import java.util.Calendar;

public class ServiceClientBean {

	private long id; 
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	private ServiceBean serviceBean;

	private Calendar date;
	private Client client;

	private long appointmentId;
	private long price;

	public ServiceClientBean(Calendar date, Client client, ServiceBean serviceBean,
			long appointmentId, long price) {
		super();
		this.date = date;
		this.client = client;
		this.appointmentId = appointmentId;
		this.price = price;
		this.serviceBean = serviceBean;
	}

	public ServiceBean getServiceBean() {
		return serviceBean;
	}

	public Calendar getDate() {
		return date;
	}

	public Client getClient() {
		return client;
	}

	public long getAppointmentId() {
		return appointmentId;
	}

	public long getPrice() {
		return price;
	}

	public void setPrice(long price) {
		this.price = price;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (appointmentId ^ (appointmentId >>> 32));
		result = prime * result + ((client == null) ? 0 : client.hashCode());
		result = prime * result + ((serviceBean == null) ? 0 : serviceBean.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ServiceClientBean other = (ServiceClientBean) obj;
		if (appointmentId != other.appointmentId)
			return false;
		if (client == null) {
			if (other.client != null)
				return false;
		} else if (!client.equals(other.client))
			return false;
		if (serviceBean == null) {
			if (other.serviceBean != null)
				return false;
		} else if (!serviceBean.equals(other.serviceBean))
			return false;
		return true;
	}

	public void setServiceBean(ServiceBean serviceBean) {
		this.serviceBean = serviceBean;
	}

	public void setDate(Calendar date) {
		this.date = date;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public void setAppointmentId(long appointmentId) {
		this.appointmentId = appointmentId;
	}
	
	

}
